package tech.aistar.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import tech.aistar.entity.Sinchoice;
import tech.aistar.entity.User;
import tech.aistar.entity.Wrongtopic;

import java.util.List;
@Repository
public interface WrongtopicMapper {
    @Select("select * from wrongtopic")
    List<Wrongtopic> findAll();

    @Select("select * from wrongtopic where wrong_parperId = #{value}")
    List<Wrongtopic> findByParperId(Long id);

    @Insert("insert into wrongtopic(wrong_id,wrong_parperId,wrong_type,wrong_qid,wrong_uid,wrong_answer) value (#{wrongId},#{wrongParperId},#{wrongType},#{wrongQid},#{wrongUid},#{wrongAnswer})")
    int insertWrongtopic(Wrongtopic wrongtopic);
}
